﻿@inherits DynamicInputBase

@if (IsSelect)
{
    <SelectInput Id=@UseId Status=@Status TValue="string"
                @bind-Value="Value" Help=@UseHelp Label=@UseLabel @attributes="AllAttributes">
    @if (Input?.AllowableEntries != null)
    {
        foreach (var entry in Input!.AllowableEntries)
        {
            <option value=@entry.Key>@entry.Value</option>
        }
    }
    else if (Input?.AllowableValues != null)
    {
        foreach (var item in Input!.AllowableValues)
        {
            <option value=@item>@item</option>
        }
    }
    </SelectInput>
}
else if (IsCheckbox)
{
    <CheckboxInput Id=@UseId Status=@Status @bind-Value="Value" Help=@UseHelp Label=@UseLabel @attributes="AllAttributes" />
}
else
{
    <TextInput type=@UseType Id=@UseId Status=@Status @bind-Value="Value" Help=@UseHelp Label=@UseLabel @attributes="AllAttributes" />
}
